FROM registry.kuick.cn/cc/java-web

RUN echo log1=WCP-war directory

ENV    REPO_PATH="/home/dms/git-repos/cc-conference" \
       DEPLOY_PROJECT_PATH="server" \
       DEPLOY_PROJECT_NAME="wcp-server" \
       DEPLOY_TARGET_PATH="/home/dms/webapps/ROOT" \
       DEPLOY_TARGET_TOMCAT_HOME="/user/local/tomcat"

ENV    PROJECT_PATH=$REPO_PATH/$DEPLOY_PROJECT_PATH/$DEPLOY_PROJECT_NAME

COPY  ./release/docker/localtime /etc/localtime
ENV  JAVA_OPTS=-Duser.timezone=Asia/Shanghai

COPY . $PROJECT_PATH

WORKDIR $PROJECT_PATH

RUN    mkdir -p $DEPLOY_TARGET_PATH && \
       unzip $PROJECT_PATH/target/$DEPLOY_PROJECT_NAME.war -d $DEPLOY_TARGET_PATH


COPY ./startup.sh    /startup.sh
RUN chmod a+x /startup.sh

EXPOSE 8080

WORKDIR $DEPLOY_TARTGET_PATH

ENTRYPOINT  /startup.sh













